package com.lzc.lblog.lblog.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lzc.lblog.lblog.entity.MPost;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lzc.lblog.lblog.vo.PostVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lzczzzz
 * @since 2020-12-02
 */
public interface MPostService extends IService<MPost> {
    /**
     * 博客分页显示
     * @param page 分页信息
     * @param categoryId 分类id
     * @param level 指定等级
     * @param recommend 是否精华
     * @param userId 用户id
     *  @param order 排序
     * @return
     */
    IPage<PostVo> paging(Page page, Long categoryId, Integer level, Boolean recommend, Long userId,String order,Integer status);

    PostVo selectDetail(Long id);

    void initWeek();

    List<MPost> hotsOnWeek();

    void viewCountIncr(PostVo postVo);
}
